package a.f.j.a;

import java.util.Iterator;

class a
{
  private g a = new g(null, null, null);
  private g c = new g(null, null, this.a);
  
  a()
  {
    this.a.a(0, this.c);
  }
  
  boolean a()
  {
    return this.a.a(null) == this.c;
  }
  
  void b()
  {
    this.a.a(0, this.c);
    this.a.a(1, null);
    this.c.a(1, this.a);
    this.c.a(0, null);
  }
  
  void c()
  {
    g localg = this.a;
    this.a = this.c;
    this.c = localg;
  }
  
  public Iterator d()
  {
    new Iterator()
    {
      g a = null;
      g c = a.this.a;
      
      public boolean hasNext()
      {
        return this.c.a(this.a) != a.this.c;
      }
      
      public Object next()
      {
        g localg = this.c;
        this.c = this.c.a(this.a);
        this.a = localg;
        return this.c.a();
      }
      
      public void remove()
      {
        g localg = this.a;
        this.a = this.a.a(this.c);
        this.c = localg;
        this.c.a(this.a).c();
      }
    };
  }
  
  g a(e parame)
  {
    g localg = new g(parame, null, null);
    a(localg);
    return localg;
  }
  
  void a(g paramg)
  {
    g localg = this.c.a(null).a(this.c);
    this.c.a(null).b(localg, paramg);
  }
  
  g b(e parame)
  {
    g localg = new g(parame, null, null);
    b(localg);
    return localg;
  }
  
  void b(g paramg)
  {
    this.a.b(null, paramg);
  }
  
  void a(a parama)
  {
    g localg = this.c.a(null).a(this.c);
    this.c.a(null).a(localg, parama);
  }
  
  void b(a parama)
  {
    this.a.a(null, parama);
  }
  
  void d(a parama)
  {
    parama.c();
    a(parama);
  }
  
  void e(a parama)
  {
    parama.c();
    b(parama);
  }
  
  void c(e parame)
  {
    boolean bool2 = c.i;
    boolean bool1 = c.h;
    int i = 0;
    Iterator localIterator = d();
    while ((localIterator.hasNext()) && ((!bool2) && ((bool2) || (!bool1)) && (localIterator.next() != parame))) {}
    localIterator.remove();
  }
  
  g e()
  {
    return this.a.a(null);
  }
  
  g f()
  {
    return this.c.a(null);
  }
  
  g g()
  {
    return this.a;
  }
  
  g h()
  {
    return this.c;
  }
  
  e i()
  {
    return this.a.a(null).a();
  }
  
  e j()
  {
    return this.c.a(null).a();
  }
  
  e l()
  {
    g localg = this.a.a(null);
    if (!c.i) {
      if (localg != null) {
        localg = localg.a(this.a);
      }
    }
    return localg.a();
  }
  
  g m()
  {
    g localg = this.a.a(null);
    if (!c.i) {
      if (localg != null) {
        localg = localg.a(this.a);
      }
    }
    return localg;
  }
  
  e n()
  {
    g localg = this.c.a(null).a(this.c);
    if (!c.i) {}
    return localg == null ? null : localg.a();
  }
  
  g o()
  {
    g localg = this.c.a(null).a(this.c);
    return localg == null ? null : localg;
  }
  
  void c(g paramg)
  {
    this.c.a(null).a(this.c, paramg);
  }
  
  void d(g paramg)
  {
    this.a.a(null).a(this.a, paramg);
  }
  
  e d(e parame)
  {
    boolean bool = c.i;
    if ((bool) || (!a()))
    {
      if (!bool) {
        if (this.a.a(null).a() == parame) {
          return this.c.a(null).a();
        }
      }
      if ((bool) || (this.c.a(null).a() == parame)) {
        return this.a.a(null).a();
      }
      throw new RuntimeException("Element " + parame.toString() + " is not at one of the ends of the list " + toString() + "!");
    }
    throw new RuntimeException("Cannot search for the opposite element if list is empty!");
  }
  
  boolean p()
  {
    return ((c.i) || (!a())) && (this.a.a(null).a() != this.c.a(null).a());
  }
  
  public String toString()
  {
    boolean bool2 = c.i;
    boolean bool1 = c.h;
    String str = "[";
    Iterator localIterator = d();
    if (localIterator.hasNext())
    {
      if (bool1) {
        break label121;
      }
      if (str != "[") {
        str = str + ", ";
      }
    }
    while (bool2)
    {
      str = str + "(" + localIterator.next().toString() + ")";
      if (!bool1) {
        break;
      }
    }
    label121:
    return str + "]";
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.j.a.a
 * JD-Core Version:    0.7.0.1
 */